File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,7 @@ export const extractGroupMetadata = (result: BinaryNode) => {
339
339
const memberAddMode = getBinaryNodeChildString ( group , 'member_add_mode' ) === 'all_member_add'
340
340
const metadata : GroupMetadata = {
341
341
id : groupId ,
342
+ addressingMode : group . attrs . addressing_mode ,
342
343
subject : group . attrs . subject ,
343
344
subjectOwner : group . attrs . s_o ,
344
345
subjectTime : + group . attrs . s_t ,
Original file line number Diff line number Diff line change @@ -406,6 +406,13 @@ export const makeMessagesSocket = (config: SocketConfig) => {
406
406
participantsList . push ( ...statusJidList )
407
407
}
408
408
409
+ if ( ! isStatus ) {
410
+ additionalAttributes = {
411
+ ...additionalAttributes ,
412
+ addressing_mode : groupData ?. addressingMode || 'pn'
413
+ }
414
+ }
415
+
409
416
const additionalDevices = await getUSyncDevices ( participantsList , ! ! useUserDevicesCache , false )
410
417
devices . push ( ...additionalDevices )
411
418
}
@@ -429,7 +436,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
429
436
const senderKeyJids : string [ ] = [ ]
430
437
// ensure a connection is established with every device
431
438
for ( const { user, device } of devices ) {
432
- const jid = jidEncode ( user , isLid ? 'lid' : 's.whatsapp.net' , device )
439
+ const jid = jidEncode ( user , groupData ?. addressingMode ? 'lid' : 's.whatsapp.net' , device )
433
440
if ( ! senderKeyMap [ jid ] || ! ! participant ) {
434
441
senderKeyJids . push ( jid )
435
442
// store that this person has had the sender keys sent to them
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ export type RequestJoinMethod = 'invite_link' | 'linked_group_join' | 'non_admin
10
10
11
11
export interface GroupMetadata {
12
12
id : string
13
+ /** group uses 'lid' or 'pn' to send messages */
14
+ addressingMode : string
13
15
owner : string | undefined
14
16
subject : string
15
17
/** group subject owner */
You can’t perform that action at this time.
0 commit comments